-- GENERATED SPELL FOR [Strashaz Sorceress] --


function spell0_4370(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15532,pUnit)
pUnit:RegisterEvent('Sorts_4370', 8322, 1)
end

function spell1_4370(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(15499,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4370', 8267, 1)
end

function spell2_4370(pUnit, Event) --@Frostbolt,Self--
pUnit:FullCastSpellOnTarget(12737,pUnit)
pUnit:RegisterEvent('Sorts_4370', 7000, 1)
end

function Sorts_4370(pUnit, Event)
local choix_sorts_4370 = math.random(0, 2)
if choix_sorts_4370 == 0 then
pUnit:RegisterEvent('spell0_4370', 1, 1)
end
if choix_sorts_4370 == 1 then
pUnit:RegisterEvent('spell1_4370', 1, 1)
end
if choix_sorts_4370 == 2 then
pUnit:RegisterEvent('spell2_4370', 1, 1)
end
end

function mob4370_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4370', math.random(1500, 3000), 1)
end

function mob4370_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4370_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4370_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4370, 1, 'mob4370_Action')
RegisterUnitEvent(4370, 2, 'mob4370_Leave')
RegisterUnitEvent(4370, 3, 'mob4370_Kill')
RegisterUnitEvent(4370, 4, 'mob4370_Die')
